1. Field of the Invention
The present invention relates to a numerical controller and method that allows position control and pressure control to be switched over to execute.
2. Description of the Related Art
A numerical controller is generally known, which controls a control object (movable portion driven by a motor) by switching from position control to pressure control or vice versa.
For example, Japanese Patent Application Laid-Open No. 3-58821 (hereinafter, referred to as Patent Document 1) discloses that, in the numerical controller which controls an injection molding machine, it is selectable whether a control at the time of the injection and pressure-holding process is taken as position control to control the position and speed of a screw (movable portion) or pressure control to feedback-control a pressure applied to the screw. According to this technique, at the time of the injection and pressure-holding process, pressure control is performed, and in the metering process following the injection and pressure-holding process, the control is switched over to position control, thereby making it possible to control a position and a speed of the screw.
Further, in a press machine in which a sheet metal (workpiece) is sandwiched by a bottom mold and a top mold fixed to a press axis, and is pressured, thereby processing the sheet metal, a die cushion device is used for the control of the pressure to sandwich the sheet metal by the top mold and the bottom mold, and this die cushion device is controlled by the numerical controller. This is disclosed in Japanese Patent Application Laid-Open No. 2006-122944 (hereinafter, referred to as Patent Document 2). This numerical controller position-controls a servo motor for driving a die cushion member, and holds the bottom mold mounting the metal sheet and the die cushion member at a predetermined position, thereby allowing a press axis to come down. When a position on which the top mold abuts against the metal sheet is detected, by this detection signal, the control of the servo motor which drives the die cushion member is switched over from position control to pressure control so that the die cushion is controlled to the predetermined pressure, thereby performing the press working.
Further, Japanese Patent Application Laid-Open No. 2006-7296 (hereinafter, referred to Patent Document 3) discloses that, in an electric servo press to drive a movable side mold by the servo motor, by using the numerical controller and the like, a speed command determined by the feedback control of a position or a torque command obtained by the feedback control of the position and the speed is compared with a speed command or a torque command determined by the control of a pressure feedback, and a smaller command from among these commands is selected and switched so as to perform a control.
In the techniques disclosed in the above described Patent Documents 1 and 2, a switching timing from position control to pressure control is decided in advance. In the technique disclosed in the Patent Document 1, when the injection and pressure-holding processes are terminated and followed by the next metering process, the control is switched over from pressure control (or position and speed control) to position and speed control, and its switching timing is decided in advance. Further, in the technique disclosed in the Patent Document 2, the switching from position control to pressure control is performed by a signal from a detector for detecting the position of the press axis.
Further, similarly to the technique disclosed in the Patent Document 3, in the technique selecting a smaller command from among the speed command determined by position control and the speed command determined by pressure control, the switching from position control to pressure control can be automatically performed, though the control after the switching cannot be executed immediately.
FIGS. 1A to 1C show an example of a device applying a desired pressure on a part A for a fixed period of time or more after the part A such as a pin is press-fitted into a hole provided in a workpiece W. After the part A is positioned at a press-fit position in a hole provided in the workpiece W (see FIG. 1A), the servo motor M is driven so as to press-fit the part A into the hole of the workpiece W through a feed mechanism B such as a ball screw/nut mechanism. After that, the desired pressure is applied to the part A for a fixed period of time or more (see FIG. 1B), and the part A is fitted and attached to the hole of the workpiece W (FIG. 1C). The driving of this servo motor M requires position control and pressure control, and for this purpose, heretofore, the numerical controller of the configuration as shown in FIG. 2 has been used.
The numerical controller, as shown in FIG. 2, is roughly divided into a numerical control unit 10 and a servo control unit 20.
In the numerical control unit 10, a program analysis processing unit 12 reads in order and analyses the command in each block of a NC program 11, and converts it into execution data, and its result is stored in a block processing unit 13. A position command/pressure command processing unit 14 reads out the execution data for individual blocks from the block processing unit 13, and (1) a distribution processing of the movement amount in the position command and its acceleration/deceleration processing are executed, so that the movement amount for every individual distribution cycle is outputted as a position command to the servo control unit 20, and moreover, (2) the distribution processing of the pressure command (commanded pressure) is performed so that the pressure command is outputted to the servo control unit 20.
Further, in a block termination determination unit 14a, it is determined whether or not the movement amount of the position command in the command in one block currently under execution has all been transferred to the servo control unit. When the movement amount has all been transferred, the block processing unit 13 is notified of the termination of the block processing. That is, the block processing unit 13 is notified of the termination of the execution of the command at the block currently under execution. The block processing unit 13, upon receipt of this block termination notice, delivers the execution data of the command in the next block to the position command/pressure command processing unit 14.
On the other hand, the servo control unit 20 comprises an error counter 21 which constitutes a position loop control unit, a position gain Kp unit 22, a comparator 23, a speed control unit 24, a current control unit 25, and a force gain unit 26 (constituting pressure control unit). A difference (position deviation) between the position command issued from the numerical control unit 10 and a position feedback from a position/speed detector provided in the servo motor and the like is calculated by the error counter 21, and this difference is multiplied by the position gain Kp, thereby obtaining a speed command Ca by position control.
Further, a difference (pressure deviation) between the pressure command outputted from the numerical control unit 10 and the pressure feedback from a pressure sensor is obtained, and this difference is multiplied by the force gain, thereby obtaining a speed command Cb by pressure control. In the comparator 23, the speed command Ca by position control is compared with the speed command Cb by pressure control, and a smaller speed command from among these commands is taken as a speed command to speed control unit 24. In speed control unit 24, from this speed command and a feedback value (not shown) of the speed, the feedback control of the speed is performed, thereby obtaining a torque command (current command) for performing the drive-control of the servo motor.
The configuration of the above described numerical controller is of a well-known type, as disclosed in the above described Patent Document 3.
When the device for press-fitting the part A such as the pin shown in FIG. 1 to the workpiece W is controlled by using the numerical controller as shown in FIG. 1, a NC program as shown in FIG. 3 is prepared, and is executed by the numerical controller. In a program example shown in FIG. 3, [O0001] denotes a program number, [N1 to N6] sequence numbers, [G100] a pressure command, [Q□□] a pressure command, [G90] an absolute command, [G01] a linear interpolation command, [X□□] a command position, and [F□□] a movement speed. [G04] denotes a dwell (stop) command, which holds the state for the time (250) shown by a code P. [G91] denotes an incremental command, and [M30] denotes a command for a program end.
By the block of the sequence number N1, the value (Q10) of a desired pressure is designated. By the block of the sequence number N2, the part A is position-controlled and moved to an insertion target position (X30) toward the workpiece W by a speed (F500). When the part A comes into contact with the workpiece W and the pressure thereof is increased, the servo control unit 20 of the numerical controller is switched over to pressure control, thereby performing a control holding a desired pressure.
The numerical control unit 10 of the numerical controller, whether the control is switched to pressure control or not, executes a movement command in the block of the sequence number N2 till the last. After that, by the block of the sequence number N3, a fixed pressure is further applied for a time (250 msec) designated at P by the G04 command.
In the block of the sequence number N4, a servo position deviation amount accumulated in an error counter 21 of the servo control unit 20 is read out by a variable #5101, and by commanding a value reversing the reference of the read servo position deviation amount, the accumulated servo position deviation amount is made zero with the maximum speed (240000). As a result, the command position coincides with the real position.
After that, the block of the sequence number N5 is executed, and the program is returned to a waiting position (X100.) by position control. The relationship between the position and time and the relationship between the actual pressure and time when this program is executed are as shown in FIG. 4.
As shown in FIG. 4, despite of the command to apply a pressure only for 250 milliseconds at a desired pressure [Q10] at the sequence number N3, pressure control is performed a little extra by a time T4. This is caused by waiting until the movement command at the block of this sequence number N2 is completed, and then, moving to the processing of the block of the next sequence number N3 even when the control is switched over to pressure control during the movement by position control at the block of the sequence number N2. This extra time T4 means a time required for commanding a remaining movement amount by position control, after switching over to pressure control from position control, until completion of the commanding. Moreover, this time T4 is not fixed.
In this manner, even when the control is automatically switched from position control to pressure control at a certain block, the control at the next block is not necessarily executed immediately, so there is a problem that a target control cannot be achieved.
Further, as another example in which the control is made by switching from position control to pressure control, there is a die cushion device in the press machine.
FIG. 5 is a schematic diagram of the die cushion device in the press machine in which a control is made by switching from position control to pressure control.
As shown in FIG. 5, the bottom mold 2 of the mold is fixed to a base of the press machine. Opposing to this bottom mold 2, the top mold 1 is fixed and arranged on the press axis (not shown). The press axis is driven by a motor or a press axis driving source (not shown) using an oil pressure or an air pressure, and the top mold 1 is driven and vertically moved by a fixed operation pattern.
At the side of the bottom mold 2, a plurality of die cushion members 6 driven vertically in the figure by the servo motor Md are provided. In FIG. 5, though an example is shown in which two pairs of the die cushion member 6 and the corresponding servo motor Md for die cushion are provided, the number of pairs may be three or more, and further, the plurality of die cushion members 6 may be connected and integrated, and it may be driven by one servo motor for die cushion. This servo motor Md for die cushion is drive-controlled by the numerical controller 5 for die cushion.
The sheet metal (workpiece) 3 to be pressed is mounted on the die cushion member 6, and is arranged on the bottom mold 2. Further, a pressure sensor 4 for detecting a pressure applied to this sheet metal 3 is provided on the bottom mold 2, and the pressure detected by this pressure sensor 4 is fed back to the numerical controller 5. Further, a sensor 7 such as a limit switch for detecting a position of the top mold 1, that is, a position of the press axis, is provided, and the output of this sensor 7 also is inputted to the numerical controller 5 for die cushion.
For this numerical controller 5 for die cushion, the numerical controller shown in FIG. 2 is used, which controls the servo motor Md by switching over from position control to pressure control or vice versa.
In a state in which the sheet metal 3 to be pressed is mounted on the die cushion member 6 and arranged on the bottom mold 2, the numerical controller 5 outputs a position command to hold the die cushion member 6 at a predetermined position, and moreover, outputs a predetermined pressure command. However, since the die cushion member 6 is held at the predetermined position commanded, the position deviation is “0” or extremely small, and the speed command Ca (see FIG. 2) by position control is “0” or a small value. On the other hand, the sheet metal 3 is not applied with a pressure from the top mold 1, and the pressure detected by the pressure sensor 4 is “0” or an extremely small value. Hence, a difference (pressure deviation) between the command pressure and the detection pressure is great, and as a result, the speed command Cb (see FIG. 2) by pressure control becomes a great value. Hence, the comparator 23 adopts the speed command Ca (Ca<Cb) from position control, thereby performing position control. As a result, the servo motor Md and the die cushion member 6 are held at the command position, and the sheet metal 3 is also held at the predetermined position.
Hence, when the press axis is driven and the top mold 1 comes down and collides against the sheet metal 3, the die cushion member 6 comes down, and the servo motor Md also moves. As a result, the position deviation increases, and the speed command Ca by position control increases. On the other hand, with the top mold 1 colliding against the sheet metal 3, the pressure applied to the pressure sensor 4 increases, and the detection pressure increases. As a result, the pressure deviation decreases, and the speed command Cb by pressure control decreases. As a result, the speed command Cb by pressure control becomes smaller than the speed command Ca by position control (Ca>Cb), and therefore, the comparator 23 selects and adopts the speed command Cb by pressure control, thereby performing pressure control. That is, the content of the position command to the servo motor Md and the die cushion member 6, outputted from the numerical control unit 10, is a position in a state where the top mold 1 and the bottom mold 2 at the press starting time are not abutted on each other (this position is referred to as a press starting position). However, in reality, since the top mold 1 depress the sheet metal 3 and comes down, the position of the servo motor Md is also deviated from the command position. As a result, as far as the top mold 1 continues to come down, the position deviation increases (that is, the speed command Ca by position control gradually increases), and therefore, the speed command Cb (Ca>Cb) by pressure control is adopted, and pressure control is performed.
When the top mold 1 goes up (during this time, the servo motor Md pushes up the die cushion member 6 so as to coincide with the command pressure) and reaches a press starting position, the position deviation becomes “0”, so that the comparator 23 is switched over so as to adopt the speed command Ca (Ca<Cb) by position control. Subsequently, position control is performed.
Although the apparatus is operated as described above, when the top mold 1 comes down and collides against the sheet metal 3, there arises a problem that the external force received by this metal sheet 3 from the top mold 1 becomes too great and an overpressure is instantaneously generated.
To prevent this overpressure from arising, position control is performed, immediately before the metal sheet 3 and the die cushion member 6 receive the external force from the top mold 1, to allow the die cushion member 6 to move to escape downward, with the result that a relative speed of the top mold 1 with respect to the die cushion member 6 is lowered, so that a shock (overpressure) at the time of the collision can be diminished. Hence, a state immediately before the top mold 1 abuts against the sheet metal 3 is detected by the sensor 7, and based on the detection result, the numerical control unit 10 (FIG. 2) of the numerical controller 5 starts position control of the servo motor Md, thereby allowing the die cushion member 6 to come down.
FIG. 6 is a view showing a time-shift of a pressure feedback value from the pressure sensor 4 at this time. Since the die cushion member 6 comes down to escape so that the relative speed with respect to the top mold 1 becomes smaller, it takes a long time for the pressure detected by the pressure detector 4 to reach a target pressure. As a result, there arises a problem that the switching from position control to pressure control takes a time T2 (see FIG. 6).
To solve this problem, it is conceivable to perform pressure control, in which a target pressure value is set low at first, thereby advancing the switching point from position control to pressure control, and after switchover to pressure control, a pressure command value is gradually increased.
FIG. 7 is one example of a NC program which includes command to the servo motor Md driving the die cushion member 6 for executing such pressure control. In FIG. 7, [G101] denotes a command for increasing the pressure designated by Q by taking the time designated by P, and [M200] denotes a command of an auxiliary function.
FIG. 8 is a view representing a positional relationship between the top mold 1 (press axis) and the die cushion member 6 when the NC program of FIG. 7 is executed and the servo motor Md is driven to control the die cushion member 6. In this FIG. 8, the axis of abscissas represents time and the axis of ordinates represents position. Further, a solid line shows a position of the top mold 1, a dash-dotted line a command position of the die cushion member, and a broken line an actual position of the die cushion member (position feedback value).
The die cushion member 6 is held (position-controlled) at the position of [300] as a press starting position. The top mold 1 comes down, and at time a, the top mold 1 is detected by the sensor 7, and a detection signal is inputted to the numerical controller 5 from the sensor 7. Then, the numerical control unit 10 of the numerical controller 5 starts the execution of the NC program of FIG. 7.
First, [G100 Q10] of the sequence number N1 is executed, and the pressure command of Q=10 is outputted to the servo control unit 20 from the numerical control unit 10. Subsequently, [G01 G91 X-150. F500] of the sequence number N2 is executed. The numerical control unit 10 obtains a distributed movement amount every distribution cycle so as to move by 150 in a negative direction (coming down) at a speed F=500, and outputs the distributed movement amount to the servo control unit 20. Then, the comparator 23 of the servo control unit 20 compares the speed command Ca by position control with the speed command Cb by pressure control. At first, since the top mold 1 is not abutted on the sheet metal 3, the feedback value from the pressure sensor 4 is small, and as a result, the pressure deviation becomes great and the speed command Cb becomes great. Further, at the initial stage, the die cushion member 6 is held at the press starting position, and the position deviation thereof is small, and as a result, the speed command Ca by position control becomes small. Consequently, because of (Ca<Cb), at first, position control is performed, so that the servo motor Md is driven at the speed F=500, and the die cushion member 6 starts coming down at time a.
Hence, the top mold 1 catches up with the sheet metal 3 and the die cushion member 6, and when the collision of the top mold 1 and the sheet metal 3 occurs at time b, the position deviation becomes great, as described above, and at the same time, the pressure deviation becomes small. Hence, as the speed command Cb by pressure control becomes smaller than the speed command Ca by position control (Ca>Cb), the control is switched to pressure control. The pressure command at this time is Q=10 commanded in the block of the sequence number N1, and pressure control is performed so as to coincide with this pressure Q=10.
In FIG. 9, the broken line shows a command pressure, and the sold line shows a pressure feedback value fed back from the pressure sensor 4. As shown in this FIG. 9, pressure control is performed so as to coincide with the command pressure Q=10. When the distribution processing of the movement amount [−150] commanded in the block of the sequence number N2 is terminated, the position command/pressure command processing unit 14 of the numerical control unit 10 executes the command in the block of the next sequence number N3. During the distribution processing of the movement amount [−150] commanded in the block of the sequence number N2, pressure control is executed at the low pressure of the command pressure Q10.
When the distribution processing of the movement amount [−150] is terminated, the command in the block of the next sequence number N3 is executed. The position command/pressure command processing unit 14 of the numerical control unit 10 performs pressure distribution processing that the pressure increases gradually from the command pressure Q10 to the command pressure Q100 by taking the commanded time P15, and its pressure command is outputted to the servo control unit 20. The servo control unit 20, upon receipt of this pressure command, performs a pressure feedback control, and as shown in FIG. 9, the command pressure is switched over from Q=10 to Q=100 by taking the time P=15. During this time, the position command to the die cushion member 6 (servo motor Md) is held at the position (300−150=150) previously commanded.
When the execution of the command in the block of the sequence number N3 is terminated, the position command/pressure command processing unit 14 of the numerical control unit 10 starts the execution of the command in the block of a sequence number N4, and executes the distribution processing that moves up to the lowest point (position X5) of the top mold 1 at the speed 240000 (the maximum speed). When the execution of the command in the block of this sequence number N4 is terminated, an auxiliary function M200 in the command in the block of a sequence number N5 is executed, and in this state, the processing is put into a waiting state until a FIN signal returns.
After that, the top mold (press axis) 1 reaches the lowest point, and the die cushion member 6 also reaches the lowest point, and in the vicinity of time c (see FIG. 8) at which the top mold 1 starts elevating, the position deviation becomes “0” or an extremely small value. Consequently, the control is switched over from pressure control to position control, and the die cushion member 6 (servo motor Md) is held at the commanded position (X5), and is put into a stopped state.
When the top mold 1 goes up and the passage of the top mold 1 is detected by the sensor 7 at time d, and as a result, when the FIN signal is returned, the command in the block of the next sequence number N6 is executed. Here, the position command/pressure command processing unit 14 performs the distribution processing of the position so as to move toward the position of X=300, which is the press starting position, at the speed F=500, and outputs its position command to the servo control unit 20. At this time, the top mold 1 is rising, and is separated from the sheet metal 3, the bottom mold 2 and the die cushion member 6. Hence, in the servo control unit 20, the pressure deviation is great and the position deviation is small, and therefore, the speed command Ca (<Cb) by position control is adopted, and position control is executed. The die cushion member 6, as shown in FIG. 8, is positioned and held at the initial press starting position (X300), and in that state, the processing of the NC program is terminated (M30).
If the NC program of this FIG. 7 is executed and the servo motor Md driving the die cushion member 6 is controlled, the operation as described above can be performed, and therefore, as shown in FIG. 9, the pressure applied to the sheet metal 3 and the like can be prevented from becoming an overpressure. As a result, the time required for reaching the target pressure can be made shorter to some extent than the case of FIG. 6. However, since the command in the block of the next sequence number N3 is not executed until the processing of the block of the sequence number N2 is terminated, a time as shown by T3 in FIG. 9 is required before the target pressure is reached. That is, a wasteful time T3 is required until the target pressure is reached after the control is switched to pressure control.
When a second moving material body comes close and collides against a first moving material body, a displacement occurs in the colliding position. That is, when the top mold 1 (press axis) moves and comes close and collides against the moving die cushion member 6 and the sheet metal 3, a displacement occurs at that colliding position. As described above, when the second moving material body collides against the first stopped material body, there arises a problem that the pressure is applied too much. However, when the die cushion member 6 and the sheet metal 3 are caused to collide against the top mold (press axis) 1 which is approaching, while they are being moved to escape for avoiding the above problem, a displacement occurs in the colliding position. Consequently, to ensure an occurrence of collision of the die cushion member 6 and the sheet metal 3 with the top mold (press axis) 1 while they are being moved, it is necessary to command a movement amount sufficient for escape (movement amount commanded by the block of the sequence number N2). However, if this movement amount is large, it takes time to perform distribution processing of this movement amount to complete the processing of the command block, and as a result, it requires time before the next command is executed (command to the target pressure is outputted). Accordingly, during a period until the distribution processing of the escape amount to allow the die cushion member 6 to escape is terminated, a time T3 is required for controlling pressure to the target pressure as shown in FIG. 9.